﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dotUML.Core.Common
{
    /// <summary>
    /// Base abstract class for diagram elements.
    /// </summary>
    abstract class DiagramElement : IDiagramElement
    {
        string _name;
        IDiagram _parentDiagram;
        bool _isProxy = false;

        #region IDiagramElement Members

        /// <summary>
        /// Diagram element name.
        /// </summary>
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                _name = value;
            }
        }

        /// <summary>
        /// Reference to a parent diagram.
        /// </summary>
        public IDiagram ParentDiagram
        {
            get
            {
                return _parentDiagram;
            }
            set
            {
                _parentDiagram = value;
            }
        }

        /// <summary>
        /// Defines if this element is a real one or a proxy.
        /// </summary>
        public bool IsProxy
        {
            get
            {
                return _isProxy;
            }
            set
            {
                _isProxy = value;
            }
        }

        /// <summary>
        /// Validates the correctness of a diagram element.
        /// </summary>
        /// <returns>true, if the element is correct. false, otherwise.</returns>
        public bool Validate()
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
